Ektron Reference


>>Helping Users Navigate Your Web Site > Using Search > Understanding Search Server Controls > Using the Advanced Query Text Parameter

Using the Advanced Query Text Parameter

The AdvancedQueryText parameter lets you customize the behavior of the search controller. As examples, you can restrict search results to

content properties, such as

- content in a folder, or a folder and all of its child folders

- Spanish-language content

user properties, such as

- those with tags set to "Race Car Fans"

- those whose email address includes "widgets.com"

eCommerce product properties, such as

- catalog number is between 1 and 10,000

- sale price is less than $50 US

Here is a sample AdvancedQueryText statement that restricts search results by language and folder.

<Ektron:SiteSearchController ID=”SiteSearchController1” AdvancedQueryText=”(contentlanguage:1033 AND folderid:10)”

The value assigned to AdvancedQueryText is appended to the user’s input.

Here are examples.

Expression Returns this content
Content
contentid<1000 ID number is less than 1000
size>5000 Size exceeds 5000 KB
xmlconfigid=10 Uses the XML configuration whose ID is 10
taxonomycategory:'Cancer' A taxonomy category that includes "cancer" is applied
doctitle:'Block' Title includes "Block"
contenttype1<100 Content type value is less than 100
See Also: Content Constants
Users  
ID>10 Users whose ID number is greater than 10
emailaddress:example.com Users whose email address includes example.com
eCommerce Catalog Entries (Products)
saleprice>100.00 Catalog entries whose price exceeds $100.00

Retrieving Folder vs. FolderPath

To reference a folder by id number, use folderid:10

To reference a folder and all of its children, use folderidpath:'10'

To exclude a folder but include all of its child folders, use (folderidpath:'10' AND NOT folderid:10)

NOTE: You cannot use the root folder as part of the foldernamepath.

Obtaining a List of Managed Properties

You can get a list of Ektron's managed properties from the API. To access this, open the code-behind file of a page that uses a templated control, such as SiteSearch.aspx.cs, and type SearchContentProperty. Intellisense displays all site search content properties.

You can also see a list of Ektron's managed properties in ReturnProperties.

You can also use this method to get a list of properties for

Users - SearchUserProperty

eCommerce catalog entries - SearcheCommerceProperty

Smart Form fields - SearchSmartFormProperty

Allowed Operators in the AdvancedQueryText Parameter

equals (=)

greater than (>)

less than (<)

contains (:)


Ektron Version 8.5, Doc. Rev. 2.0 (Dec. 2011)
Visit the
Ektron Dev Center at http://dev.ektron.com 1–866–4–EKTRON
Ektron Documentation, © 2011 Ektron, Inc.